#include "widget.h"
#include "ui_widget.h"

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);

    ui->groupBox->setTitle("汉堡");
    ui->groupBox_2->setTitle("小食");
    ui->groupBox_3->setTitle("饮料");

    ui->comboBox->addItem("麦辣鸡腿堡");
    ui->comboBox->addItem("培根疏脆双层牛堡");
    ui->comboBox->addItem("巨无霸");

    ui->comboBox_2->addItem("麦辣鸡腿");
    ui->comboBox_2->addItem("麦辣鸡翅");
    ui->comboBox_2->addItem("薯条");

    ui->comboBox_3->addItem("可乐");
    ui->comboBox_3->addItem("雪碧");
    ui->comboBox_3->addItem("橙汁");

    ui->spinBox->setValue(1);
    ui->spinBox_2->setValue(1);
    ui->spinBox_3->setValue(1);
}

Widget::~Widget()
{
    delete ui;
}


void Widget::on_pushButton_clicked()
{
    qDebug() << "当前所选套餐为: " << ui->comboBox->currentText() << ":" << ui->spinBox->value()
             << " " << ui->comboBox_2->currentText() << ":" << ui->spinBox_2->value()
             << " " << ui->comboBox_3->currentText() << ":" << ui->spinBox_3->value();
}
